#pragma once

#include "Model.h"
#include "Heightmap.h"

struct HeightmapVertex
{
	typedef std::vector<HeightmapVertex> Vector_t;

	float x, y, z,
		  nx, ny, nz,
		  u, v;
};

class Terrain : public Model
{
public:
	static const HashedString type;

	Terrain();
	Terrain( Pointer<Heightmap>& heightmap );
	void Initialize( Pointer<Heightmap>& heightmap );
	float getWidth();
	float getLength();
	float getTrueHeight( float x, float y );
	void setTexture();
	const HashedString& Type();
protected:
	Pointer<Heightmap> m_heightmap;
};